<template>
  <div class="login">
    <div class="logindiv">
      <div class="loginform">
        <el-tabs stretch v-model="activename" type="card" tab-position="top">
          <el-tab-pane label="普通登录" name="first">
            <el-form
              :model="form"
              ref="form"
              :rules="rules"
              label-width="0px"
              :inline="false"
              size="normal"
            >
              <el-form-item>
                <el-input
                placeholder="手机号/ 邮箱/ 身份证号/ 登录名"
                  prefix-icon="el-icon-user"
                  v-model="form.name"
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-input
                 placeholder="请输入密码"
                  prefix-icon="el-icon-unlock"
                  show-password
                  v-model="form.pwd"
                ></el-input>
              </el-form-item>
              <el-form-item>
                <el-input placeholder="请输入验证码" v-model="form.cap">
                  <template slot="append"
                    ><img src="/images/captcha.jpg" alt=""
                  /></template>
                </el-input>
              </el-form-item>
              <el-form-item>
                <el-button @click="login">登录</el-button>
              </el-form-item>
            </el-form>
          </el-tab-pane>
          <el-tab-pane label="U盾登录" name="second">
              <div class="ukey">请插入Ukey登录</div>
              <el-button type="primary" size="default" @click="login" >验证</el-button>
              
          </el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activename: "first",
      form: {
        name: "",
        pwd: "",
        cap:'',
      },
      rules:{},
    };
  },
  methods: {
      login(){
          this.$router.push({
              name:'main'
          })
      }
  },
};
</script>

<style >
.login {
  width: 100%;
  height: 100vh;
  background: url("/images/iBg.png") center no-repeat;
  background-size: cover;
}
.logindiv {
  position: relative;

  margin: 0px auto;
  top: 120px;
  width: 650px;
  height: 490px;
  background: url("/images/iRight.png") center no-repeat;
  background-size: cover;
}
.loginform {
    width: 270px;
  position: absolute;
  right: 0px;
  padding: 70px 40px 40px 10px;
}
.loginform .el-input__inner {
  height: 45px;
}
.loginform .el-form {
  margin-top: 20px;
}
.loginform .el-form .el-form-item{
    margin-bottom: 16px;
}
.loginform .el-button{
    width: 100%;
    height: 56px;
    background: #689FFF;
    color: white;
    font-size: 20px;
    font-weight: bolder;
}
.ukey{
    line-height: 150px;
    margin: 30px auto;
    text-align: center;
    font-size: 18px;
    color: #CDD2D5;
    height: 150px;
    width: 200px;
    border: solid 1px #CDD2D5;
}
</style>